﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using MovieDB.Data.Entities;

namespace MovieDB.Data.Repositories
{
    public interface IRepository<T>
        where T: BaseEntity
    {
        void Save(T entity);
        void Delete(T entity);
        T FindById(int id);
        T FindBy(Expression<Func<T, bool>> condition);
        T FindBy(Expression<Func<T, bool>> condition, bool defaultIfEmpty);
        List<T> FindManyBy(Expression<Func<T, bool>> condition);
    }
}
